1. Field of the Invention
This invention relates generally to computer program testing, and more particularly to applet and xlet manager software compatibility testing.
2. Description of the Related Art
Java™, originally developed by Sun Microsystems, is an object-oriented, multithreaded, portable, platform-independent environment used to develop, test, and maintain software programs. As used hereafter, any reference to Java will be understood to contain the appropriate trademark reference owned by Sun Microsystems Inc. To assure platform-independence, Java implementations are often tested using methods that confirm consistency across multiple hardware platforms, operating systems, and other implementations of the same Java technology specification. This type of testing generally is referred to as compatibility testing.
FIG. 1 is an illustration showing a conventional Java based software environment 100. Java accomplishes platform independence using a Java virtual machine (JVM) 104, which resides above the native operating system (OS) 102. In addition, the Java based environment can include an application programming interface (API) 106 that provides additional functionality to Java applications 108 executing on the JVM 104.
Generally, the Java program 108 comprises machine-independent byte code, which is interpreted by the JVM 102 before being run on a native instruction set of the target processor. In addition, the API 106 can provide libraries of functions, which the Java application 108 can use to perform specific tasks. In the example of FIG. 1, the Java application 108 is essentially a “standalone” program, which can create what it needs to execute. That is, the Java application 108 generally does not need other applications to execute properly.
Because of its “standalone” nature, a testing program can easily perform compatibility testing on the Java API 106 by loading a test that calls Java API 106 into JVM and monitor the test's behavior. However, not all Java based programs are “standalone” applications. For example, Java programs have found extensive use on the World Wide Web, which is the Internet's multimedia information retrieval system. These programs include smaller programs, known as applets, that run in a Java enabled Web browser or applet viewer. Such Java applets require an applet manager, such as the Java enabled browser, to execute properly.
FIG. 2A is a block diagram showing a conventional Java applet based software environment 200. Similar to FIG. 1, the conventional applet based software environment 200 includes an OS layer 102, on which a JVM 104 and API 106 are executed. However, the applet based software environment 200 also includes an applet manager 110, which in the example of FIG. 2A is a Java enabled browser, that provides an environment for applet programs 112 to execute. In operation, the applet manager 110 controls the state and execution of the applets 112. That is, the applet manager 110 determines when to load, start, and stop each applet 112. For example, a particular input applet 112 may be designed to create and open a small window that allows a user to input data. In this case, the applet manager 110 (browser) may load the input applet 112 in response to a user making a particular selection on the browser 110 to enter data.
Similar to applets, Java based software for small devices often require a separate software manager to execute properly. Generally, Java software for small devices is developed using Java 2 Micro Edition (J2ME), which is an edition of Java 2 for small devices such as PDAs and consumer appliances. One type of program often used in J2ME is the Xlet, which is a program similar to an applet, which executes within an Xlet manager.
FIG. 2B is a block diagram showing a conventional J2ME Xlet based software environment 250. Similar to FIG. 2A, the conventional Xlet based software environment 250 includes an OS layer 102′, on which a JVM 104′ and API 106′ are executed. However, the Xlet based software environment 250 includes an Xlet manager 254 that provides an environment for Xlet programs 256 to execute. As with the applet manager of FIG. 2A, the Xlet manager 254 controls the state and execution of the Xlets 256. Hence, the Xlet manager 254 controls when each Xlet is loaded, paused, and active.
Unfortunately, because of the management software requirements, programs such as the applets 112 and Xlets 256 of FIGS. 2A and 2B are not easily accessible by testing programs. In particular, these programs have their life cycles managed by the applet manager 110 or the Xlet manager 254 software via methods defined in a life cycle interface that the applications implement. However, there is no public application manager API available where the life cycle for the applets or Xlets is defined. Hence, there is no way for the testing program to request the application manager to change the state of applets or Xlets, or query the application manager for the state of applets or Xlets.
In view of the foregoing, there is a need for a testing method that is capable of testing the application management functionalities of an application manager, such as an applet manager or Xlet manager. The methods should provide a mechanism for testing software to test an application manager's ability to manage the life cycles of the programs under its control.